
<?php  session_start();
if (!isset($_SESSION["YiBan_usrName"])){
    header("Location:iapp.php");
}else
    //echo $_SESSION["YiBan_usrName"];
?>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>表白</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css" media="screen" title="no title">
    <script src="js/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
    <script src="js/jquery.mobile-1.4.5.min.js" charset="utf-8"></script>
    <link rel="stylesheet" href="css/homepage.css" media="screen" title="no title">
    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" media="screen" />
    <script src="js/submit.js" charset="utf-8"></script>
</head>

<body>
  <div id="Header" class="Header" data-role="header">
    <!-- <img src="images/logo.png" class="Header-logo" width="100%" height="400px"  alt=""/> -->
    <img src="images/title.png" class="Header-title" width="250px" alt="鹿易表白墙" />
    <!-- <img src="images/icon/logo2.png" alt="" /> -->
  </div>
  <div class="main-body" id="saylove-box" data-role="content">
    <!-- <form id="saylove-box" class="" action="" method="post"> -->
      <fieldset>
        <legend>你的信息</legend>
        <label for="nickName">你的昵称</label>
        <input type="text" name="nickName" id="nickName" value="">
        <label for="trueName">你的真名</label>
        <input type="text" name="trueName" id="trueName" value="">
        <p class="guess-hint">
          注：真名保密不显示！可以参加紧张刺激的猜名字游戏！详细介绍请点击查看：<a style="color:#333;" href="help.html">帮助</a>
        </p>
        <select class="gender-Type" id="genderType" name="type">
          <option value="male">男</option>
          <option value="female">女</option>
          <option value="secrecy">保密</option>
        </select>
      </fieldset>
      
      <fieldset>
        <legend>TA的信息</legend>
          <label for="towho">TA的名字、选择性别</label>
          <input type="text" name="towho" id="towho" value="">
          <select class="itsGender-Type" id="itsGenderType" name="type">
            <option value="female">女</option>
            <option value="male">男</option>
            <option value="secrecy">保密</option>
          </select>
          <label for="switch" style=" float: left; line-height: 45px; margin-bottom: 6px; "> 启用邮箱通知：</label>
          <input type="checkbox" data-role="flipswitch" name="switch" id="switch" onchange="openEmailNotice();" data-on-text="启用" data-off-text="关闭">
          <div id="email-box" style="display: none;clear: both;">
            <label for="email">TA的邮箱(选填)</label>
            <input type="text" name="email" id="email" value="" placeholder="填写QQ号码或账号，如：597914752">
            <select class="email-Type" id="emailType" name="type">
              <option value="@qq.com">@qq.com</option>
              <option value="@163.com">@163.com</option>
              <option value="@hotmail.com">@hotmail.com</option>
              <option value="@gmail.com">@yahoo.com</option>
              <option value="@gmail.com">@gmail.com</option>
            </select>
            <p class="guess-hint">注：邮箱保密不显示！系统可以代发一封提示邮件！查看：<a style="color:#333;" href="help.html">帮助</a></p>
          </div>
      </fieldset>
      
      <label for="contents" style=" text-align: left; clear: both; ">表白的内容</label>
      <textarea name="contents" id="contents" onkeyup="words_deal()"></textarea>
      <p id="textCountBox">
        剩余<span id="textCount">520</span>个字
      </p>
      <p id="Hint"></p>

      <!-- <input type="submit" id="submit" name="submit" value="提交"> -->
      <a href="#hint" data-rel="popup" id="submit" class="ui-btn ui-btn-inline ui-corner-all" data-position-to="window" data-transition="pop">提交</a>
      <div data-role="popup" id="hint" class="ui-content" data-overlay-theme="b">
        <img src="images/icon/heart.gif" alt="" />
      </div>
    <!-- </form> -->
  </div>
  <div data-role="footer" id="footer" data-position="fixed" data-fullscreen="true" data-tap-toggle="false">
    <div class="" data-role="navbar">
      <ul>
        <li><a href="index.php" data-ajax='false' data-transition="slide" data-direction="reverse" data-role="button" data-icon="article" class="ui-icon-article" data-iconpos="notext">首页</a></li>
        <li><a href="saylove.php" data-ajax='false' data-role="button" data-icon="heartNow" class="ui-icon-heart" data-iconpos="notext">表白</a></li>
        <li><a href="search.html" data-ajax='false' data-role="button" data-icon="search" class="ui-icon-search" data-iconpos="notext">搜索</a></li>
        <li><a href="help.html" data-ajax='false' data-role="button" data-icon="help" class="ui-icon-help" data-iconpos="notext">帮助</a></li>
      </ul>
    </div>

  </div>
  
  <script src="js/jquery-1.12.4.min.js"></script>
<script>
    $("#contents").bind("input propertychange", function (event) {
        fitle($("#contents"));
    });
	$("#nickName").bind("input propertychange", function (event) {
        fitle($("#nickName"));
    });
	$("#towho").bind("input propertychange", function (event) {
        fitle($("#towho"));
    });

    function fitle(doc) {
        var inputValue = doc.val();
        var wordArr = new Array("王俊凯");
        for (var i = 0; i < wordArr.length; i++) {
            var word = wordArr[i];
            var pattern = new RegExp(word);
            if (inputValue != "" && inputValue != null) {
                if (pattern.test(inputValue)) {
                    alert("输入字符中包含有禁止输入字符，将自动清除！");
                    inputValue = inputValue.replace(pattern, "");
                    doc.val(inputValue);
                    doc.focus();
                    return false;
                }
            }
        }
    }

</script>

</body>

</html>
